﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Specialized;
using System.Globalization;

namespace PagamentoDigital {
    public class Dependente {

        private string _email;
        private double _valor;

        /** Properties **/

        public string Email {
            get {
                return _email;
            }
            set {
                _email = value;
            }
        }

        public double Valor {
            get {
                return _valor;
            }
            set {
                _valor = value;
            }
        }

        public Dependente() {

        }

        public Dependente(string email, double valor)
            : this() {
            this._email = email;
            this._valor = valor;
        }

        public NameValueCollection GetParametros(CultureInfo culture, int index) {
            NameValueCollection nvc = new NameValueCollection();
            nvc.Add("email_dependente_" + index, this._email);
            nvc.Add("valor_dependente_" + index, string.Format(culture, "{0:0.00}", this._valor));
            return nvc;
        }

    }
}
